﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace demo
{
    public partial class Screen : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                if (this.Request.Params["id"] == "1")
                {
                    lbText.Text = "Validating Your ATM Card...";
                    Response.AddHeader("Refresh", "3;http://localhost:2439/InputPIN.aspx");
                }
                if (this.Request.Params["id"] == "2")
                {
                    lbText.Text = "Validating Your ATM Card...";
                    Response.AddHeader("Refresh", "3;http://localhost:2439/Screen.aspx/?id=3");
                }
                if (this.Request.Params["id"] == "3")
                {
                    lbText.Text = "Does Not Recognize Your ATM Card<br/>Ejecting Card";
                    Response.AddHeader("Refresh", "3;http://localhost:2439/InputCardNo.aspx");
                }
                if (this.Request.Params["id"] == "4")
                {
                    lbText.Text = "Validating Your PIN...";
                    Response.AddHeader("Refresh", "3;http://localhost:2439/MainPage.aspx");
                }

                if (this.Request.Params["id"] == "5")
                {
                    lbText.Text = "Validating Your PIN...";
                    Response.AddHeader("Refresh", "3;http://localhost:2439/Screen.aspx/?id=7");
                }

                if (this.Request.Params["id"] == "6")
                {
                    lbText.Text = "Validating Your PIN...";
                    Response.AddHeader("Refresh", "3;http://localhost:2439/InputPIN.aspx/?id=1");
                }

                if (this.Request.Params["id"] == "7")
                {
                    lbText.Text = "You have entered three times Wrong PIN<br/>Your Card is blocked!";
                    Response.AddHeader("Refresh", "3;http://localhost:2439/InputCardNo.aspx");
                }
                if (this.Request.Params["id"] == "8")
                {
                    lbText.Text = "Searching.....";
                    Response.AddHeader("Refresh", "3;http://localhost:2439/DetailViewHistory.aspx/?id=1");
                }
                if (this.Request.Params["id"] == "9")
                {
                    lbText.Text = "Searching.....";
                    Response.AddHeader("Refresh", "3;http://localhost:2439/DetailViewHistory.aspx/?id=2");
                }
                if (this.Request.Params["id"] == "10")
                {
                    lbText.Text = "Searching.....";
                    Response.AddHeader("Refresh", "3;http://localhost:2439/DetailViewHistory.aspx/?id=3");
                }
                if (this.Request.Params["id"] == "11")
                {
                    lbText.Text = "Searching.....";
                    Response.AddHeader("Refresh", "3;http://localhost:2439/DetailViewHistory.aspx/?id=4");
                }
                if (this.Request.Params["id"] == "12")
                {
                    lbText.Text = "Searching.....";
                    Response.AddHeader("Refresh", "3;http://localhost:2439/DetailViewHistory.aspx/?id=5");
                }
                if (this.Request.Params["id"] == "13")
                {
                    lbText.Text = "Searching.....";
                    Response.AddHeader("Refresh", "3;http://localhost:2439/DetailViewHistory.aspx/?id=6");
                }
            }
        }
    }
}